#include "../func.h"

void* threadfunc(void* p)
{
    char* p1 = (char*)p;
    printf("I am child thread, p1 = %s\n", p1);
}

int main()
{
    pthread_t pthid;
    char buf[50] = "Hello";
    int ret;
    ret = pthread_create(&pthid, NULL, threadfunc, buf);
    if (0 != ret)
    {
        printf("pthread_create failed ret = %d\n", ret);
        return -1;
    }

    sleep(1);
}
